#!/bin/bash

set -e

root=$(cd $(dirname ${0})/..; pwd)
temp=$(mktemp -d)
pushd ${temp} > /dev/null
npm install --silent --no-save icon-convert
npx icon-convert --types ico,icns,png512 --out ${root}/setup ${root}/setup/icon.svg
mv ${root}/setup/icon_512x512.png ${root}/src/icon.png
popd > /dev/null
rm -rf ${temp}
